
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

    <title>Standard test job for QEMU - Stretch amd64 &#8212; LAVA 2024.05 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css" />
    <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/sphinx_highlight.js"></script>
    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Standard test job for QEMU - Sid arm64" href="standard-qemu-kernel.html" />
    <link rel="prev" title="Gold standard test jobs" href="standard-test-jobs.html" />
    <link rel="canonical" href="https://docs.lavasoftware.org/lava/standard-qemu-stretch.html" />
  
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="_static/js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>


  </head><body>

  <div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="index.html"><span><img src="_static/lava.png"></span>
          LAVA</a>
        <span class="navbar-text navbar-version pull-left"><b>2024.05</b></span>
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            
                <li><a href="genindex.html">Index</a></li>
                <li><a href="contents.html">Contents</a></li>
            
            
              <li class="dropdown globaltoc-container">
  <a role="button"
     id="dLabelGlobalToc"
     data-toggle="dropdown"
     data-target="#"
     href="index.html">Site <b class="caret"></b></a>
  <ul class="dropdown-menu globaltoc"
      role="menu"
      aria-labelledby="dLabelGlobalToc"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Introduction to LAVA</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="contents.html">Contents</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary of terms</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="support.html">Getting support</a></li>
</ul>
</ul>
</li>
              
                <li class="dropdown">
  <a role="button"
     id="dLabelLocalToc"
     data-toggle="dropdown"
     data-target="#"
     href="#">Page <b class="caret"></b></a>
  <ul class="dropdown-menu localtoc"
      role="menu"
      aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">Standard test job for QEMU - Stretch amd64</a><ul>
<li><a class="reference internal" href="#context">Context</a><ul>
<li><a class="reference internal" href="#arch">arch</a></li>
<li><a class="reference internal" href="#netdevice">netdevice</a></li>
</ul>
</li>
<li><a class="reference internal" href="#deploy">Deploy</a></li>
<li><a class="reference internal" href="#boot">Boot</a></li>
<li><a class="reference internal" href="#test">Test</a></li>
<li><a class="reference internal" href="#next-steps">Next steps</a></li>
</ul>
</li>
</ul>
</ul>
</li>
              
            
            
              
                
  <li>
    <a href="standard-test-jobs.html" title="Previous Chapter: Gold standard test jobs"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; Gold standard...</span>
    </a>
  </li>
  <li>
    <a href="standard-qemu-kernel.html" title="Next Chapter: Standard test job for QEMU - Sid arm64"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Standard test... &raquo;</span>
    </a>
  </li>
              
            
            
            
            
              <li class="hidden-sm"></li>
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
    <div class="body col-md-12 content" role="main">
      
  <section id="standard-test-job-for-qemu-stretch-amd64">
<span id="standard-amd64-stretch-qemu"></span><span id="index-0"></span><h1>Standard test job for QEMU - Stretch amd64<a class="headerlink" href="#standard-test-job-for-qemu-stretch-amd64" title="Permalink to this heading">¶</a></h1>
<p>The first standard job to look at is a small step on from the first example
job:</p>
<pre class="code yaml literal-block"><code><span class="comment single"># Standard Stretch amd64 JOB definition for QEMU</span><span class="whitespace">
</span><span class="name tag">device_type</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">qemu</span><span class="whitespace">
</span><span class="name tag">job_name</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">qemu amd64 standard build, Debian Stretch</span><span class="whitespace">

</span><span class="name tag">timeouts</span><span class="punctuation">:</span><span class="whitespace">
  </span><span class="name tag">job</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">10</span><span class="whitespace">
  </span><span class="name tag">action</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">2</span><span class="whitespace">
  </span><span class="name tag">connection</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">2</span><span class="whitespace">
</span><span class="name tag">priority</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">medium</span><span class="whitespace">
</span><span class="name tag">visibility</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">public</span></code></pre>
<p><a class="reference external" href="examples/test-jobs/qemu-amd64-standard-stretch.yaml">Download / view full job definition</a></p>
<section id="context">
<h2>Context<a class="headerlink" href="#context" title="Permalink to this heading">¶</a></h2>
<p>Some <a class="reference internal" href="glossary.html#term-device-type"><span class="xref std std-term">device types</span></a> can support multiple types of
deployment in the template and the <a class="reference internal" href="glossary.html#term-job-context"><span class="xref std std-term">job context</span></a> variable is used in the
test job submission to dictate how the test job is executed. The first example
test job included the use of <code class="docutils literal notranslate"><span class="pre">context</span></code> and the standard test job for QEMU
extends this:</p>
<pre class="code yaml literal-block"><code><span class="name tag">context</span><span class="punctuation">:</span><span class="whitespace">
  </span><span class="name tag">arch</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">amd64</span><span class="whitespace">
  </span><span class="comment single"># comment out or change to user if the dispatcher does not support bridging.</span><span class="whitespace">
  </span><span class="name tag">netdevice</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">tap</span></code></pre>
<section id="arch">
<h3>arch<a class="headerlink" href="#arch" title="Permalink to this heading">¶</a></h3>
<p>The context variable <code class="docutils literal notranslate"><span class="pre">arch</span></code> dictates which QEMU binary is used to execute the
test job. The value needs to match the architecture of the files which QEMU is
expected to execute. In this case, <code class="docutils literal notranslate"><span class="pre">amd64</span></code> means that <code class="docutils literal notranslate"><span class="pre">qemu-system-x86_64</span></code>
will be used to run this test job.</p>
</section>
<section id="netdevice">
<h3>netdevice<a class="headerlink" href="#netdevice" title="Permalink to this heading">¶</a></h3>
<p>The context variable <code class="docutils literal notranslate"><span class="pre">netdevice</span></code> is used by the jinja template to instruct
QEMU to use the <code class="docutils literal notranslate"><span class="pre">tap</span></code> device on the command line. This support expects that
the dispatcher has a working network bridge available. (Setting up a network
bridge is beyond the scope of this documentation.) The purpose of the <code class="docutils literal notranslate"><span class="pre">tap</span></code>
device is to allow the virtual machine to be visible for external connections
like reverse DNS and SSH. If your local instance does not support the tap
device, the <code class="docutils literal notranslate"><span class="pre">netdevice</span></code> option should be commented out so that QEMU can use
the default <code class="docutils literal notranslate"><span class="pre">user</span></code> networking support.</p>
</section>
</section>
<section id="deploy">
<h2>Deploy<a class="headerlink" href="#deploy" title="Permalink to this heading">¶</a></h2>
<p>This is also familiar from the first job. The addition here is that the
standard image build exports the SHA256sum of the prepared files to allow the
checksum to be passed to LAVA to verify that the download is the correct file:</p>
<pre class="code yaml literal-block"><code><span class="name tag">actions</span><span class="punctuation">:</span><span class="whitespace">
</span><span class="comment single"># DEPLOY_BLOCK</span><span class="whitespace">
</span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">deploy</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">timeout</span><span class="punctuation">:</span><span class="whitespace">
      </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">4</span><span class="whitespace">
    </span><span class="name tag">to</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">tmpfs</span><span class="whitespace">
    </span><span class="name tag">images</span><span class="punctuation">:</span><span class="whitespace">
        </span><span class="name tag">rootfs</span><span class="punctuation">:</span><span class="whitespace">
          </span><span class="name tag">image_arg</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">-drive format=raw,file={rootfs}</span><span class="whitespace">
          </span><span class="name tag">url</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">http://example.com/stretch.img.gz</span><span class="whitespace">
          </span><span class="name tag">sha256sum</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">b5cdb3b9e65fec2d3654a05dcdf507281f408b624535b33375170d1e852b982c</span><span class="whitespace">
          </span><span class="name tag">compression</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">gz</span></code></pre>
</section>
<section id="boot">
<h2>Boot<a class="headerlink" href="#boot" title="Permalink to this heading">¶</a></h2>
<p>Here is another small change from the first example job. The standard build
also outputs details of the prompts which will be output by the image upon
boot. This information is then used in the test job submission:</p>
<pre class="code yaml literal-block"><code><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">boot</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">method</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">qemu</span><span class="whitespace">
    </span><span class="name tag">media</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">tmpfs</span><span class="whitespace">
    </span><span class="name tag">timeout</span><span class="punctuation">:</span><span class="whitespace">
      </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">2</span><span class="whitespace">
    </span><span class="name tag">prompts</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="literal string">&quot;root&#64;debian:&quot;</span><span class="whitespace">
    </span><span class="name tag">auto_login</span><span class="punctuation">:</span><span class="whitespace">
      </span><span class="name tag">login_prompt</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal string">&quot;login:&quot;</span><span class="whitespace">
      </span><span class="name tag">username</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">root</span></code></pre>
</section>
<section id="test">
<h2>Test<a class="headerlink" href="#test" title="Permalink to this heading">¶</a></h2>
<p>The standard QEMU test job for stretch adds an <a class="reference internal" href="glossary.html#term-inline"><span class="xref std std-term">inline</span></a> test definition as
the only change from the example first job:</p>
<pre class="code yaml literal-block"><code><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">test</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="name tag">timeout</span><span class="punctuation">:</span><span class="whitespace">
      </span><span class="name tag">minutes</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">5</span><span class="whitespace">
    </span><span class="name tag">definitions</span><span class="punctuation">:</span><span class="whitespace">
    </span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">repository</span><span class="punctuation">:</span><span class="whitespace">
        </span><span class="name tag">metadata</span><span class="punctuation">:</span><span class="whitespace">
          </span><span class="name tag">format</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">Lava-Test Test Definition 1.0</span><span class="whitespace">
          </span><span class="name tag">name</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">smoke-tests-basic</span><span class="whitespace">
          </span><span class="name tag">description</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal string">&quot;Basic</span><span class="name variable"> </span><span class="literal string">system</span><span class="name variable"> </span><span class="literal string">test</span><span class="name variable"> </span><span class="literal string">command</span><span class="name variable"> </span><span class="literal string">for</span><span class="name variable"> </span><span class="literal string">Debian</span><span class="name variable"> </span><span class="literal string">images&quot;</span><span class="whitespace">
        </span><span class="name tag">run</span><span class="punctuation">:</span><span class="whitespace">
          </span><span class="name tag">steps</span><span class="punctuation">:</span><span class="whitespace">
          </span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="literal scalar plain">printenv</span><span class="whitespace">
      </span><span class="name tag">from</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">inline</span><span class="whitespace">
      </span><span class="name tag">name</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">env-dut-inline</span><span class="whitespace">
      </span><span class="name tag">path</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">inline/env-dut.yaml</span><span class="whitespace">
    </span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">repository</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">http://git.linaro.org/lava-team/lava-functional-tests.git</span><span class="whitespace">
      </span><span class="name tag">from</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">git</span><span class="whitespace">
      </span><span class="name tag">path</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">lava-test-shell/smoke-tests-basic.yaml</span><span class="whitespace">
      </span><span class="name tag">name</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">smoke-tests</span><span class="whitespace">
    </span><span class="punctuation indicator">-</span><span class="whitespace"> </span><span class="name tag">repository</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">http://git.linaro.org/lava-team/lava-functional-tests.git</span><span class="whitespace">
      </span><span class="name tag">from</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">git</span><span class="whitespace">
      </span><span class="name tag">path</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">lava-test-shell/single-node/singlenode03.yaml</span><span class="whitespace">
      </span><span class="name tag">name</span><span class="punctuation">:</span><span class="whitespace"> </span><span class="literal scalar plain">singlenode-advanced</span></code></pre>
</section>
<section id="next-steps">
<h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this heading">¶</a></h2>
<p>Before moving on to the next standard test jobs for non-emulated devices like
the beaglebone-black and cubietruck, consider spending some time developing the
standard QEMU test job:</p>
<ul class="simple">
<li><p>Add more commands to the inline test definition</p></li>
<li><p>Follow the link from the metadata and use the instructions to rebuild the
image.</p>
<ul>
<li><p>Modify the metadata to point at your build information</p></li>
<li><p>Modify the SHA256sum and the URL in the deploy action.</p></li>
</ul>
</li>
<li><p>Write a new test definition using version control and make it available
publicly, then add that definition to your test job based on this first
standard test job.</p></li>
</ul>
</section>
</section>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
    </p>
    <p>
        &copy; Copyright 2010-2019, Linaro Limited.<br/>
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 5.3.0.<br/>
    </p>
  </div>
</footer>
  </body>
</html>